package com.design.patterns.list.listener.listener;

import com.design.patterns.list.listener.event.RainWeatherEvent;
import com.design.patterns.list.listener.event.WeatherEvent;

/**
 * 具体监听者
 * @author Wangzhiwen
 */
public class RainListener implements WeatherListener {


    @Override
    public void onWeatherEvent(WeatherEvent event) {
        if (event instanceof RainWeatherEvent) {
            System.out.println(event.getWeather());
        }
    }
}
